package com.liang.countdownlatch;

import java.util.concurrent.CountDownLatch;

public class Demo {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(2);

        Mother mother = new Mother(countDownLatch);
        mother.start();

        Children ch = new Children(countDownLatch);
        ch.setName("小明");
        ch.start();

        Children1 ch1 = new Children1(countDownLatch);
        ch1.setName("小丽");
        ch1.start();
    }
}
